<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Date Test</title>
 <script src="Class.js" type="text/javascript"></script>
 <script src="MyDate.js" type="text/javascript"></script>
 
 <script type="text/javascript">
 	var myDate = new MyDate();
 	function initialize(){
		document.getElementById('fechaDeHoy').innerHTML = '<b>'+myDate.date+'</b>';
		document.getElementById('language').innerHTML = '<b>'+myDate.language+'</b>';
	}
	function newMyDate(dateString){
		myDate = new MyDate(dateString);
		document.getElementById('fechaDeHoy').innerHTML = '<b>'+myDate.date+'</b>';
	}
	function isToday(){
		document.getElementById('today').innerHTML = '<b>'+myDate.isToday()+'</b>';
	}
	function isYesterday(){
		document.getElementById('yesterday').innerHTML = '<b>'+myDate.isYesterday()+'</b>';
	}
	function formatDate(format){
		myDate.formatDate(format);
		document.getElementById('fechaDeHoy').innerHTML = '<b>'+myDate.date+'</b>';
	}
	function setLanguage(lang){
		myDate.setLanguage(lang);
		document.getElementById('language').innerHTML = '<b>'+myDate.language+'</b>';
	}
	function elegantFormat(){
		document.getElementById('fechaDeHoy').innerHTML = '<b>'+myDate.elegantFormat()+'</b>';
	}

 </script>
</head>
<body onload="initialize();">
	<table>
    	<tr>
        	<td> FECHA DE CALCULO (myDate): </td>
            <td id="fechaDeHoy"></td>
        </tr>
        <tr><td colspan="2"><hr /></td></tr>
        <tr>
        	<td> <a href="#" onClick="isToday();">isToday()</a></td>
            <td id="today"></td>
        </tr>
        <tr>
        	<td> <a href="#" onClick="isYesterday();">isYesterday()</a></td>
            <td id="yesterday"></td>
        </tr>
        <tr>
        	<td colspan="2"> Date Parse: <a href="#" onClick="newMyDate('03-20-2008 23:10:24');">new MyDate("03-20-2008 23:10:24")</a></td>
        </tr>
        <tr>
        	<td colspan="2"> Date Format: <a href="#" onClick="formatDate('MMM dd, yyyy hh:mm:ssa');">formatDate("MMM dd, yyyy hh:mm:ssa")</a></td>
        </tr>
        <tr>
        	<td> <a href="#" onClick="setLanguage('en');">english</a></td>
            <td id="language"></td>
        </tr>
        <tr>
        	<td> <a href="#" onClick="setLanguage('sp');">spanish</a></td>
            <td></td>
        </tr>
        <tr>
        	<td colspan="2"><a href="#" onClick="elegantFormat();">Elegant Format</a></td>
        </tr>
    </table>
</body>
</html>
